#include <iostream>
using std::cout;
using std::endl;

class Point
{
public:
    static Point & getInstance(){
        static Point pt(2,8);
        return pt;
    }

    void print(){
        cout << "(" << _ix
            << "," << _iy
            << ")" << endl;
    }
private:
    Point(int x,int y)
    : _ix(x)
    , _iy(y)
    {
        cout << "Point(int,int)" << endl;
    }

    ~Point(){
        cout << "~Point()" << endl;
    }

    Point(const Point & rhs) = delete;
    Point & operator=(const Point & rhs) = delete;
private:
    int _ix;
    int _iy;
};

void test0(){
    Point & pt1 = Point::getInstance();
    Point & pt2 = Point::getInstance();
    cout << &pt1 << endl;
    cout << &pt2 << endl;
}

int main(void){
    test0();
    return 0;
}
